package anonymous.argumentdefined;

public class Car {

	private void driveTo(Place p) {
		System.out.println("Driving to " + p.getLocation());
	}

	public void driveHome() {
		driveTo(new Place() {

			public String getLocation() {
				return "Cluj-Napoca.";
			}
		});
	}

	public static void main(String[] args) {
		Car car = new Car();
		car.driveHome();
	}
}
